# import random
# import struct
# import hashlib
from . import tlv_builder


# import tlv_builder


# import tlv_builder

class TlvBuilderAb(tlv_builder.TlvBuilder):
    def __init__(self, data={}):
        tlv_builder.TlvBuilder.__init__(self, data)

    def build_data(self):
        if self.tlv_type != 5:
            self.tlv_attr["abchekone"] = (b"\x00" * 80).decode("utf-8")
            self.tlv_attr["abchektwo"] = (b"\x00" * 144).decode("utf-8")
        self.change_attr(self.tlv_attr)
        result = super().build_data()
        return result


if __name__ == "__main__":
    # data = {"type": 3, "serial_no": 22080, "user_ip": "192.168.1.190",
    #         "attr": {"username": "zyt", "password": "123456", "abmac": "12345647946"}, "secret": "123456789"}
    # # data["username"] = "zyt"
    # # data["pwd"] = "123456"
    # # secret = "123456789"
    # # print(TlvParse().get_online_data(data, secret))
    # # tb = TlvBuilder()
    # # tb.attr_print()
    # # a = {"username": "zyt", "pwd": "123456"}
    # # data = {"attr": a, "secret": "123456"}
    # tb = TlvBuilderAb(data)
    # # tb.attr_print()
    # tb.print_attr()
    # print(tb.build_data())
    # tb.test(*data)
    # tb.print_attr()
    a = "\x00" * 80
    print(a.encode("utf-8"))
